package com.weibo4j.api.domain;

import java.util.List;

import com.alibaba.fastjson.annotation.JSONField;

public class ApiStat {
	
	@JSONField(name = "ip_limit")
	private Long ipLimit;
	
	@JSONField(name = "limit_time_unit")
	private String limitTimeUnit;
	
	@JSONField(name = "remaining_ip_hits")
	private Long remainingIpHits;
	
	@JSONField(name = "remaining_user_hits")
	private Long remainingUserHits;
	
	@JSONField(name = "reset_time")
	private String resetTime;
	
	@JSONField(name = "reset_time_in_seconds")
	private Long resetTimeInSeconds;
	
	@JSONField(name = "user_limit")
	private Long userLimit;
	
	@JSONField(name = "api_rate_limits")
	private List<ApiRate> apiRateLimits;
	
	public Long getIpLimit() {
		return ipLimit;
	}

	public void setIpLimit(Long ipLimit) {
		this.ipLimit = ipLimit;
	}

	public String getLimitTimeUnit() {
		return limitTimeUnit;
	}

	public void setLimitTimeUnit(String limitTimeUnit) {
		this.limitTimeUnit = limitTimeUnit;
	}

	public Long getRemainingIpHits() {
		return remainingIpHits;
	}

	public void setRemainingIpHits(Long remainingIpHits) {
		this.remainingIpHits = remainingIpHits;
	}

	public Long getRemainingUserHits() {
		return remainingUserHits;
	}

	public void setRemainingUserHits(Long remainingUserHits) {
		this.remainingUserHits = remainingUserHits;
	}

	public String getResetTime() {
		return resetTime;
	}

	public void setResetTime(String resetTime) {
		this.resetTime = resetTime;
	}

	public Long getResetTimeInSeconds() {
		return resetTimeInSeconds;
	}

	public void setResetTimeInSeconds(Long resetTimeInSeconds) {
		this.resetTimeInSeconds = resetTimeInSeconds;
	}

	public Long getUserLimit() {
		return userLimit;
	}

	public void setUserLimit(Long userLimit) {
		this.userLimit = userLimit;
	}

	public List<ApiRate> getApiRateLimits() {
		return apiRateLimits;
	}

	public void setApiRateLimits(List<ApiRate> apiRateLimits) {
		this.apiRateLimits = apiRateLimits;
	}

	class ApiRate {
		
		private String api;
		
		private Long limit;
		
		@JSONField(name = "limit_time_unit")
		private String limitTimeUnit;
		
		@JSONField(name = "remaining_hits")
		private Long remainingHits;

		public String getApi() {
			return api;
		}

		public void setApi(String api) {
			this.api = api;
		}

		public Long getLimit() {
			return limit;
		}

		public void setLimit(Long limit) {
			this.limit = limit;
		}

		public String getLimitTimeUnit() {
			return limitTimeUnit;
		}

		public void setLimitTimeUnit(String limitTimeUnit) {
			this.limitTimeUnit = limitTimeUnit;
		}

		public Long getRemainingHits() {
			return remainingHits;
		}

		public void setRemainingHits(Long remainingHits) {
			this.remainingHits = remainingHits;
		}
	}
}
